def swap_max_min(li: list) -> list:
    li_new = li[:]
    li_new.sort(reverse=True)
    max_l = li_new[0]
    min_l = li_new[-1]
    index_max = li.index(max_l)
    index_min = li.index(min_l)
    li[index_max] = min_l
    li[index_min] = max_l
    return li

assert swap_max_min([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == [10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0]
assert swap_max_min([10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]) == [0, 9, 8, 7, 6, 5, 4, 3, 2, 1, 10]
assert swap_max_min([1000, 31231, 313, 312324, 423, 42, 525, 5, 345, 34, 534, 63]) == \
        [1000, 31231, 313, 5, 423, 42, 525, 312324, 345, 34, 534, 63]